package com.tuling.designpattern.composite;

/**
 * @author 林瑞涛
 * @desc
 * @date 2021年07月28日 18:34
 */
public class TestDemo {
    public static void main(String[] args) {
        Market root = new MarketBranch("总店");
        Market szBranch = new MarketBranch("深圳分店");
        Market ftJoin = new MaketJoin("福田加盟店");
        Market nsJoin = new MaketJoin("南山加盟店");

        szBranch.add(ftJoin);
        szBranch.add(nsJoin);
        root.add(szBranch);
        root.payByCard();
    }
}
